package it.accaemme.sgame;

import java.util.ArrayList;
import java.util.Random;

import android.content.res.Resources;

public class Frasi {
	public Frasi(ArrayList<Frase> arr){
		this.frasi = arr;
	}

	/*
	public Frasi(String[] from){
		System.out.println("frasi.java - from = " + from.length );
		
		ArrayList<String> to = new ArrayList<String>();
		int i=0;
	    do{
	    	to.add(from[0]);
	    	i++;
	    }while( i <= from.length );
	    
	    this.frasi = to;
	}
	
	public String getRandomFrase(){
		System.out.println("frasi.java - this.frasi = " + this.frasi.size());
		
		Random rand = new Random();
		int m = rand.nextInt(this.frasi.size());
		
		return frasi.get(m);
	}
	*/
	
	public ArrayList<Frase> getFrasi(){
		return this.frasi;
	}
	
	void setBodyPiece(){
		ArrayList<String> body_parts = new ArrayList<String>();
		
	}
	String getBodyPiece(){
		
		return "";
	}

	
	static ArrayList<String> travasa(ArrayList<String> to, String[] from){
		if(to == null)
		  to = new ArrayList<String>();
	
		if(from != null){
		 for( String s : from ){
			to.add(s);
		 }
		 
		} else {
			System.out.println("from is null!!");
		}
	    
		return to;
	}
	
	void setResources(Resources res){
		this.res = res;
	}
	
	Resources getResources(){
		return this.res;
	}
	

	Resources res;
	ArrayList<Frase> frasi;
}
